import React from 'react';
import { Table } from 'antd';

export default function WorkHandoverTable({ systemTododata, loading, type }) {
    const columns = React.useMemo(
        () => [
            {
                title: '名称',
                dataIndex: 'taskTitle',
                key: 'taskTitle'
            },
            {
                title: '类型',
                dataIndex: 'taskTypeName',
                key: 'taskTypeName',
                width: 200
            },
            {
                title: '推送时间',
                dataIndex: 'sendTime',
                key: 'sendTime',
                width: 200
            },
            {
                title: '截止时间',
                dataIndex: 'overdueTime',
                key: 'overdueTime',
                width: 200
            }
        ],
        []
    );
    return (
        <div style={{ marginBottom: 16 }}>
            <Table
                columns={columns}
                dataSource={systemTododata?.rows}
                scroll={{ y: type === 'showShort' ? 300 : 540 }}
                pagination={false}
                loading={loading}
            />
        </div>
    );
}
